package com.jsm.tf.exception;

import lombok.Data;

@Data
public class BusinessException extends RuntimeException {
    private String errorMsg;
    private int code;
    private String title;
    public BusinessException(int code, String errorMsg) {
        super(errorMsg);
        this.code=code;
        this.errorMsg=errorMsg;
    }
    public BusinessException(int code, String errorMsg,String title) {
        super(errorMsg);
        this.title=title;
        this.code=code;
        this.errorMsg=errorMsg;
    }
    public BusinessException(String errorMsg) {
        super(errorMsg);
        this.code=500;
        this.errorMsg=errorMsg;
    }
    public BusinessException(String errorMsg,String title) {
        super(errorMsg);
        this.code=500;
        this.title=title;
        this.errorMsg=errorMsg;
    }
}
